package com.bestdreamer.design.principle.openclose;

public class Test {

    public static void main(String[] args) {
        ICourse iCourse = new JavaDiscountCourse(96,"Java从入门到精通",345d);
        JavaDiscountCourse javaCourse = (JavaDiscountCourse)iCourse;
        System.out.println("课程ID："+javaCourse.getId() + " 课程名称："+javaCourse.getName()
                + "课程折后价："+javaCourse.getPrice() +"课程原价："+javaCourse.getOriginPrice());
    }
}
